﻿<%@ Page Language="C#" MasterPageFile="~/MasterPages/management.Master" AutoEventWireup="true" CodeBehind="import.aspx.cs" Inherits="pcsse.management.import"  %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
   <%-- 这里放自己的样式表文件--%>
    <style type="text/css">
        .style4
        {
            width: 308px;
        }
        .style5
        {
            width: 146px;
        }
        .style6
        {
            width: 136px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="hoder_sidebar" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="hoder_maincontent" runat="server">
<div class="p_title">
数据导入
</div>
    <table style="width: 400px">
        <tr style="width: 120px">
            <td class="style5">
                <asp:Label ID="Label1" runat="server" Text="选择文件"></asp:Label>
            </td>
            <td class="style6">
                <asp:FileUpload ID="xlsFu" runat="server" Height="20px" Width="200px" 
                    Font-Size="Smaller" />
            </td>
            <td class="style4" style="width: 80px">
                <asp:LinkButton ID="ufBt" runat="server" onclick="ufBt_Click">上传</asp:LinkButton>
            </td>
        </tr>
        <tr>
            <td class="style5">
                <asp:Label ID="Label2" runat="server" Text="选择表格"></asp:Label>
            </td>
            <td class="style4" colspan="2">
                <asp:DropDownList ID="sheetDdl" runat="server" Height="20px" Width="100px" 
                    AutoPostBack="True" onselectedindexchanged="sheetDdl_SelectedIndexChanged">
                    <asp:ListItem>未上传文件</asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="style5">
                <asp:Label ID="Label13" runat="server" Text="选择数据"></asp:Label>
            </td>
            <td class="style4" colspan="2">
                <asp:DropDownList ID="dataDdl" runat="server" Height="20px" 
                    onselectedindexchanged="dataDdl_SelectedIndexChanged" Width="100px" 
                    AutoPostBack="True">
                    <asp:ListItem>人员数据</asp:ListItem>
                    <asp:ListItem>党员数据</asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="style5">
                <asp:Label ID="Label3" runat="server" Text="选择支部"></asp:Label>
            </td>
            <td class="style6">
                <asp:DropDownList ID="branchDdl" runat="server" DataSourceID="sheetDdlOds" 
                    DataTextField="FULLNAME" DataValueField="ID" Height="20px" Width="200px">
                </asp:DropDownList>
                <asp:ObjectDataSource ID="sheetDdlOds" runat="server" DeleteMethod="Delete" 
                    InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" 
                    SelectMethod="GetData" TypeName="managementTableAdapters.T_BRANCHTableAdapter" 
                    UpdateMethod="Update">
                    <DeleteParameters>
                        <asp:Parameter Name="Original_ID" Type="Int32" />
                    </DeleteParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="YEAR" Type="String" />
                        <asp:Parameter Name="BR_NAME" Type="String" />
                        <asp:Parameter Name="Original_ID" Type="Int32" />
                    </UpdateParameters>
                    <InsertParameters>
                        <asp:Parameter Name="YEAR" Type="String" />
                        <asp:Parameter Name="BR_NAME" Type="String" />
                    </InsertParameters>
                </asp:ObjectDataSource>
            </td>
            <td class="style4" style="width: 80px">
                <asp:LinkButton ID="importBt" runat="server" onclick="importBt_Click">导入</asp:LinkButton>
            </td>
        </tr>
    </table>
    <asp:GridView ID="pGv" runat="server" 
        AutoGenerateColumns="False">
        <Columns>
            <asp:TemplateField HeaderText="编号">
                <ItemTemplate>
                    <asp:Label ID="Label4" runat="server" Text='<%# Bind("NUMBER") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle Width="80px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="姓名">
                <ItemTemplate>
                    <asp:Label ID="Label5" runat="server" Text='<%# Bind("NAME") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle Width="80px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="性别">
                <ItemTemplate>
                    <asp:Label ID="Label8" runat="server" Text='<%# Bind("GENDER") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle Width="40px" Wrap="False" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="出生日期">
                <ItemTemplate>
                    <asp:Label ID="Label9" runat="server" Text='<%# Bind("BIRTHDAY") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle Width="120px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="证件号码">
                <ItemTemplate>
                    <asp:Label ID="Label10" runat="server" Text='<%# Bind("IDNUMBER") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle Width="150px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="联系方式">
                <ItemTemplate>
                    <asp:Label ID="Label11" runat="server" Text='<%# Bind("TELEPHONE") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle Width="120px" Wrap="True" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="电子邮件">
                <ItemTemplate>
                    <asp:Label ID="Label12" runat="server" Text='<%# Bind("EMAIL") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle Width="120px" />
            </asp:TemplateField>
        </Columns>
        <EmptyDataTemplate>
            <asp:Label ID="Label7" runat="server" Text="没有上传文件或文件格式不正确，请上传文件并且确定文件格式"></asp:Label>
        </EmptyDataTemplate>
    </asp:GridView>
    <asp:GridView ID="partyGv" runat="server"  
        AutoGenerateColumns="False">
        <Columns>
            <asp:TemplateField HeaderText="编号">
                <ItemTemplate>
                    <asp:Label ID="Label14" runat="server" Text='<%# Bind("NUMBER") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle Width="60px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="申请时间">
                <ItemTemplate>
                    <asp:Label ID="Label15" runat="server" Text='<%# BinD("APP_TIME") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle Width="120px" Wrap="True" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="积极分子">
                <ItemTemplate>
                    <asp:Label ID="Label16" runat="server" Text='<%# Bind("ACTIVE_TIME") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle Width="120px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="培训时间">
                <ItemTemplate>
                    <asp:Label ID="Label17" runat="server" Text='<%# Bind("TRAIN_TIME") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle Width="120px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="预备党员">
                <ItemTemplate>
                    <asp:Label ID="Label18" runat="server" Text='<%# Bind("PRE_TIME") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle Width="120px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="联系人">
                <ItemTemplate>
                    <asp:Label ID="Label19" runat="server" Text='<%# Bind("CONN_NAME") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle Width="80px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="介绍人">
                <ItemTemplate>
                    <asp:Label ID="Label20" runat="server" Text='<%# Bind("INTRO_NAME") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle Width="80px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="转正时间">
                <ItemTemplate>
                    <asp:Label ID="Label21" runat="server" Text='<%# Bind("FULL_TIME") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle Width="120px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="状态">
                <ItemTemplate>
                    <asp:Label ID="Label22" runat="server" Text='<%# BIND("STATE") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle Width="60px" />
            </asp:TemplateField>
        </Columns>
        <EmptyDataTemplate>
            <asp:Label ID="Label7" runat="server" Text="没有上传文件或文件格式不正确，请上传文件并且确定文件格式"></asp:Label>
        </EmptyDataTemplate>
    </asp:GridView>
    <asp:GridView ID="errGv" runat="server" AutoGenerateColumns="False">
        <Columns>
            <asp:TemplateField HeaderText="编号">
                <ItemTemplate>
                    <asp:Label ID="Label23" runat="server" Text='<%# Bind("NUMBER") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle Width="100px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="错误信息">
                <ItemTemplate>
                    <asp:Label ID="Label24" runat="server" Text='<%# Bind("ERR_INFO") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle Width="300px" />
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <asp:Label ID="errLb" runat="server" Text=""></asp:Label>
</asp:Content>
